<extend name="Base/base" />
<block name="css">

</block>

<block name="content">
<div class="page-header">
	<h1>
		权限管理
		<small>
			<i class="icon-double-angle-right"></i>
			修改权限规则
		</small>
	</h1>
</div><!-- /.page-header -->

<div class="row">
	<div class="col-xs-12">
		<!-- 页面 内容 开始 -->
		<form class="form-horizontal" role="form" id="add_form">

			<!-- 数据的id值 -->
			<input type="hidden" name="id" value="{$data['id']}">

			<!-- 权限规则分类 -->
			<if condition="$data['pid'] neq 0">
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 权限规则： </label>
					<div class="col-sm-5">
						<select name="pid" class="form-control" id="form-field-select-1">
							<foreach name="parents" item="v">
								<option <if condition="$v.id eq $data.id">selected</if>  value="$v['id']">{$v['title']}</option>
							</foreach>
						</select>
					</div>
				</div>
			</if>
			<div class="space-4"></div>
			<!-- 规则名称 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 规则名称： </label>

				<div class="col-sm-9">
					<input name="title" type="text" id="form-field-1" value="{$data['title']}" class="col-xs-10 col-sm-5" />
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规格方法 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 规则方法： </label>

				<div class="col-sm-9">
					<input name="name" type="text" id="form-field-1" value="{$data['name']}" class="col-xs-10 col-sm-5" />
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规格状态 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 规格状态： </label>

				<div class="col-sm-9">
					<div class="radio">
						<label>
							<!-- 默认为开启状态 -->
							<input value="1" checked="checked"  name="status" type="radio" class="ace" />
							<span class="lbl"> 开启</span>
						</label>
						&nbsp;&nbsp;
						<label>
							<input value="0" name="status" type="radio" class="ace" />
							<span class="lbl"> 关闭</span>
						</label>
					</div>
				</div>
			</div>

			<div class="space-4"></div>
			<!-- 规格类型 -->
			<!-- 规格条件 -->

			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info" type="button" id="edit-submit">
						<i class="icon-ok bigger-110"></i>
						Submit
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="reset">
						<i class="icon-undo bigger-110"></i>
						Reset
					</button>
				</div>
			</div>
		</form>
		<!-- PAGE CONTENT ENDS -->
	</div><!-- /.col -->
</div><!-- /.row -->
</block>

<block name="js">

	<script>
		var SCOPE = {
			"edit_url" : "{:U('Admin/Rule/doEdit')}",
			"success_url" : "{:U('Rule/index')}"
		};
	</script>
</block>